﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Layout/SiteHead.master" AutoEventWireup="true" CodeBehind="MailAddressList.aspx.cs" Inherits="MailTool.Pages.MailAddressList" %>

<%@ Register Src="~/InfoControls/Pagination.ascx" TagName="Pagination" TagPrefix="suc" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
    模板列表
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="HeadContent" runat="server">
    <script type="text/javascript">
        function linkAdd() {
            var iwidth = window.screen.width;
            var iheight = window.screen.height;
            iwidth = iwidth < 500 ? 500 : iwidth;
            iheight = iheight < 400 ? 400 : iheight;
            var addArticleurl = "MailAddressEdit.aspx?action=add";
            var isclose = OpenWindowWithSize(addArticleurl, iwidth, iheight);
            //if (isclose) {
            //window.location.reload();
            //}
        }
        function linkEdit(addressListId) {
            var iwidth = window.screen.width;
            var iheight = window.screen.height;
            iwidth = iwidth < 500 ? 500 : iwidth;
            iheight = iheight < 400 ? 400 : iheight;
            var editArticleurl = "MailAddressEdit.aspx?action=edit&&addressListId=" + addressListId;
            var isclose = OpenWindowWithSize(editArticleurl, iwidth, iheight);
            //if (isclose) {
            //window.location.reload();
            //}
        }
        function isdatenull() {
            var search = $("#<%=txtSearch.ClientID%>").val();
            if (search == "") {
                alert("请输入要查询的内容或标签！");
                return false;
            }
            return true;
        }
    </script>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="SubMinTitle" runat="server">
    搜索联系人：请输入要查询的内容或标签：
    <asp:TextBox ID="txtSearch" runat="server"></asp:TextBox>
    <asp:Button ID="BtnSearchRecord" OnClientClick="return isdatenull();" CssClass="right-button02"
        runat="server" OnClick="BtnSearchRecord_Click" Text="查 询" />
</asp:Content>
<asp:Content ID="Content4" ContentPlaceHolderID="MainContent" runat="server">
    <table id="subtree1" width="100%" border="0" cellspacing="0" cellpadding="0">
        <tr>
            <td>
                <table width="95%" border="0" align="center" cellpadding="0" cellspacing="0">
                    <tr>
                        <td height="20">
                            <span class="newfont07">选择：<a href="#" class="right-font08" onclick="selectAll('ChkSelect');">全选</a>-<a
                                href="#" class="right-font08" onclick="unselectAll('ChkSelect');">反选</a></span>
                            <asp:Button ID="btnDeleteSelect" CssClass="right-button08" OnClientClick="return confirmDelete('ChkSelect',true);"
                                OnClick="BenDeleteSelect" runat="server" Text="删除所选联系人" />
                            <input name="Submit2" type="button" class="right-button08" value="添加新联系人" onclick="linkAdd();" />
                        </td>
                    </tr>
                    <tr>
                        <td height="40" class="font42">
                            <table width="100%" border="0" cellpadding="4" cellspacing="1" bgcolor="#464646"
                                class="newfont03">
                                <tr class="CTitle">
                                    <td height="22" colspan="10" align="center" style="font-size: 16px">通讯录列表
                                    </td>
                                </tr>
                                <tr align="center" bgcolor="#EEEEEE">
                                    <td align="center" height="30">选择
                                    </td>
                                    <td>姓名
                                    </td>
                                    <td>E-mail
                                    </td>
                                    <td>标签
                                    </td>
                                    <td>创建日期
                                    </td>
                                    <td>编辑
                                    </td>
                                    <td>删除
                                    </td>
                                </tr>
                                <asp:Repeater ID="rptNewsList" runat="server">
                                    <ItemTemplate>
                                        <tr class="listitems <%#(rptNewsList.Items.Count%2==0?"odd":"even")%>">
                                            <td align="center" height="20" class="item40">
                                                <asp:HiddenField ID="HiddenId" runat="server" Value='<%#DataBinder.Eval(Container.DataItem, "Id")%>' />
                                                <asp:CheckBox ID="ChkSelect" runat="server" />
                                            </td>
                                            <td nowrap="nowrap">
                                                <%#Eval("UserName")%>
                                            </td>
                                            <td nowrap="nowrap">
                                                <%#Eval("Address")%>
                                            </td>
                                            <td nowrap="nowrap" class="item80">
                                                <%#Eval("Tag")%>
                                            </td>
                                            <td nowrap="nowrap" class="item80">
                                                <%# Convert.ToDateTime(Eval("CreateDate")).ToString("yyyy-MM-dd")%>
                                            </td>
                                            <td class="item40">
                                                <a class="opt" href="#" onclick="linkEdit(<%#Eval("Id")%>)"><span class="icon-sprite icon-edit"></span></a>
                                            </td>
                                            <td class="item40">
                                                <asp:LinkButton ID="lnkDeleteNews" CssClass="opt" OnClick="DeleteNewsByLink" CommandArgument='<%#DataBinder.Eval(Container.DataItem, "Id")%>'
                                                    OnClientClick="return confirmDelete('ChkSelect',false);" runat="server"><span class="icon-sprite icon-delete">
                                                </span></asp:LinkButton>
                                            </td>
                                        </tr>
                                    </ItemTemplate>
                                </asp:Repeater>
                            </table>
                        </td>
                    </tr>
                </table>
                <table width="95%" border="0" align="center" cellpadding="0" cellspacing="0">
                    <tr>
                        <td height="6">
                            <img alt="" src="../Style/images/spacer.gif" width="1" height="1" />
                        </td>
                    </tr>
                    <tr>
                        <td height="33">
                            <suc:Pagination ID="Pagination" PageSize="12" runat="server"></suc:Pagination>
                        </td>
                    </tr>
                </table>
            </td>
        </tr>
    </table>
</asp:Content>
<asp:Content ID="Content5" ContentPlaceHolderID="MainBody" runat="server">
</asp:Content>
